import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import GoodsAdd from '../views/GoodsAdd.vue'
import GoodsSearch from '../views/GoodsSearch.vue'
import GoodsSearch2 from '../views/GoodsSearch2.vue'
import GoodsUpdate from '../views/GoodsUpdate.vue'
import User from '../views/User.vue'
import Administrator from '../views/Administrator.vue'
import SupplierAdd from '../views/SupplierAdd.vue'
import SupplierSearch from '../views/SupplierSearch.vue'
import SupplierSearch2 from '../views/SupplierSearch2.vue'
import SupplierUpdate from '../views/SupplierUpdate.vue'
import EmployeeAdd from '../views/EmployeeAdd.vue'
import EmployeeSearch from '../views/EmployeeSearch.vue'
import EmployeeSearch2 from '../views/EmployeeSearch2.vue'
import EmployeeUpdate from '../views/EmployeeUpdate.vue'
import MainAdd from '../views/MainAdd.vue'
import MainSearch from '../views/MainSearch.vue'
import MainSearch2 from '../views/MainSearch2.vue'
import MainUpdate from '../views/MainUpdate.vue'
import DetailAdd from '../views/DetailAdd.vue'
import DetailSearch from '../views/DetailSearch.vue'
import DetailSearch2 from '../views/DetailSearch2.vue'
import DetailUpdate from '../views/DetailUpdate.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  
  {
    path: '/user',
    name: 'User',
    component: User,
	children:[
		{	
		path: '/suppliersearch2',
		name: 'SupplierSearch2',
		component: SupplierSearch2,
		},
		{
		  path: '/goodssearch2',
		  name: 'GoodsSearch2',
		  component: GoodsSearch2,
		},
		{
		   path: '/employeesearch2',
		   name: 'EmployeeSearch2',
		   component: EmployeeSearch2,
		},
		{
		   path: '/mainsearch2',
		   name: 'MainSearch2',
		   component: MainSearch2,
		},
		{
		   path: '/detailsearch2',
		   name: 'DetailSearch2',
		   component: DetailSearch2,
		},	
		]
		
},
 
  {
    path: '/administrator',
    name: 'Administrator',
    component: Administrator,
	children:[
		{
		path: '/supplieradd',
		name: 'SupplierAdd',
		component: SupplierAdd,
		},
		{
		path: '/suppliersearch',
		name: 'SupplierSearch',
		component: SupplierSearch,
		},
		{
		  path: '/goodssearch',
		  name: 'GoodsSearch',
		  component: GoodsSearch,
		},
		{
		   path: '/goodsadd',
		   name: 'GoodsAdd',
		   component: GoodsAdd,
		},
		{
		   path: '/employeeadd',
		   name: 'EmployeeAdd',
		   component: EmployeeAdd,
		},
		{
		   path: '/employeesearch',
		   name: 'EmployeeSearch',
		   component: EmployeeSearch,
		},
		{
		   path: '/mainadd',
		   name: 'MainAdd',
		   component: MainAdd,
		},
		{
		   path: '/mainsearch',
		   name: 'MainSearch',
		   component: MainSearch,
		},
		{
		   path: '/detailadd',
		   name: 'DetailAdd',
		   component: DetailAdd,
		},
		{
		   path: '/detailsearch',
		   name: 'DetailSearch',
		   component: DetailSearch,
		},	
		{
			path: '/detailupdate',
			name: 'DetailUpdate',
			component: DetailUpdate,
		},
		{
			path: '/employeeupdate',
			name: 'EmployeeUpdate',
			component: EmployeeUpdate,
		},
		{
			path: '/goodsupdate',
			name: 'GoodsUpdate',
			component: GoodsUpdate,
		},
		{
			path: '/mainupdate',
			name: 'MainUpdate',
			component: MainUpdate,
		},
		{
			path: '/supplierupdate',
			name: 'SupplierUpdate',
			 component: SupplierUpdate,
		},
	]
  },
  
  
 
]

const router = new VueRouter({
  routes
})

export default router
